Attribute VB_Name = "modFriendSystem"

Public Sub InviteFriend()
    Dim buffer As clsBuffer
    
    Set buffer = New clsBuffer
    
    buffer.WriteLong CSendFriendRequest
    SendData buffer.ToArray
    
    Set buffer = Nothing
End Sub

Public Sub AcceptFriendInv()
    Dim buffer As clsBuffer
    
    Set buffer = New clsBuffer
    buffer.WriteLong CAcceptFriendInv
    SendData buffer.ToArray()
    Set buffer = Nothing
End Sub

Public Sub DeclineFriendInv()
    Dim buffer As clsBuffer
    
    Set buffer = New clsBuffer
    buffer.WriteLong CDeclineFriendInv
    SendData buffer.ToArray()
    Set buffer = Nothing
End Sub

Public Sub RemoveFriend(ByVal FriendIndex As Byte)
    Dim buffer As clsBuffer
    
    Set buffer = New clsBuffer
    buffer.WriteLong CRemoveFriend
    buffer.WriteByte FriendIndex
    SendData buffer.ToArray()
    Set buffer = Nothing
End Sub

Public Sub PopulateFriendList()
    Dim i As Byte
    
    frmMain.lstFriendList.Clear
    
    If Friends.NumOfFriends <= 0 Then Exit Sub
    
    
    For i = 1 To Friends.NumOfFriends
        If Friends.online(i) Then
            frmMain.lstFriendList.ForeColor = vbGreen
        Else
            frmMain.lstFriendList.ForeColor = vbRed
        End If
        frmMain.lstFriendList.AddItem Friends.FriendName(i)
    Next
End Sub
